<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>05_模板解析_一般指令</title>
  <style>
    .aclass {
      color: red;
    }
    .bClass {
      font-size: 30px;
    }
  </style>
</head>
<body>
<div id="test">
  <p v-text="msg"></p>
  <p v-html="msg"></p>
  <p class="bClass" v-class="myClass">xxxxxx</p>
</div>

<script type="text/javascript" src="js/mvvm/compile.js"></script>
<script type="text/javascript" src="js/mvvm/mvvm.js"></script>
<script type="text/javascript" src="js/mvvm/observer.js"></script>
<script type="text/javascript" src="js/mvvm/watcher.js"></script>
<script type="text/javascript">
  new MVVM({
    el: '#test',
    data: {
      msg: '<a href="http://www.atguigu.com">尚硅谷</a>',
      myClass: 'aclass'
    },
    methods: {
      test () {
        alert(this.msg)
      }
    }
  })
</script>
</body>
</html>